package 第一章优化;

public class 数组地址 {
    public static void main(String[] args) {
        int[] a = new int[]{1, 2, 3};
        System.out.println("a=" + a[0]);
        System.out.println("a=" + a[1]);
        System.out.println("a=" + a[2]);
        System.out.println(a);

        /*****************/
        int[] b = a;//实际上是将a的地址复制给了b，     a,b
        /*****************/

        System.out.println("b=" + b[0]);
        System.out.println("b=" + b[1]);
        System.out.println("b=" + b[2]);
        System.out.println(b);
        b[1] = 200;
        b[2] = 300;
        System.out.println("a=" + a[0]);
        System.out.println("a=" + a[1]);
        System.out.println("a=" + a[2]);


    }
}
